package com.yuyou.fn.tradingservice.service;

import com.github.wens.framework.service.ISuperService;
import com.github.wens.mybatisplus.plugins.Page;
import com.yuyou.fn.tradingservice.entity.ServiceCategory;
import com.yuyou.fn.tradingservice.vo.CategoryCommonVo;
import com.yuyou.fn.tradingservice.vo.CategoryTreeVo;
import com.yuyou.fn.tradingservice.vo.ServiceCategoryTreeVo;
import com.yuyou.fn.tradingservice.vo.ServiceCategoryVo;

import java.util.HashMap;
import java.util.List;

/**
 *
 * ServiceCategory 表数据服务层接口
 *
 */
public interface IServiceCategoryService extends ISuperService<ServiceCategory,Long> {

    ServiceCategory findDetail(Long categoryId);

    void saveCategory(ServiceCategoryVo categoryVo);

    List<ServiceCategory> findListByType(Integer type);

    void editCategory(ServiceCategoryVo categoryVo);

    void deleteCategory(Long categoryId);

    Page<ServiceCategory> findCategoryForPage(ServiceCategoryVo category, int pageNo, int pageSize);

    String findCategoryNameById(Long categoryId );

    List<ServiceCategory> getChildCategory(Long categoryId);

    List<ServiceCategory> findCategoryByType(Integer type);

    List<Long> getAllChildCategory(Long categoryId);

    List<ServiceCategory> findSubCategoryByType(Integer type);

    void saveCategoryList(CategoryCommonVo categoryCommonVo,CategoryTreeVo categoryTreeVo);

    void deleteByRootId(Long rootId);

    List<ServiceCategory> findOrderByRooIdAndParentId(Integer type);

    List<ServiceCategoryTreeVo> findServiceCategoryTreeVoByType(Integer type);

    HashMap<Integer,List<ServiceCategory>> findMapByType();
}